import request from '@/utils/request'

export function listLedger(query) {
    return request({
        url: '/resource/consume/list',
        method: 'get',
        params: query
    })
}

export function newListLedger(query) {
    return request({
        url: '/resource/consume/ledger/list',
        method: 'get',
        params: query
    })
}

export function delLedger(chackIds) {
    return request({
        url: 'resource/bzwz/check/delete/' + chackIds,
        method: 'delete',
    })
}

export function checkListLedger(query) {
    return request({
        url: 'resource/bzwz/check/list',
        method: 'get',
        params: query
    })
}

export function bzwzList(query) {
    return request({
        url: '/resource/bzwz/jcxm/list',
        method: 'get',
        params: query
    })
}

export function delHcypList(consumeIds) {
    return request({
        url: '/resource/consume/delete/' + consumeIds,
        method: 'delete',
    })
}

export function hcypViewForm(consumeId) {
    return request({
        url: '/resource/consume/' + consumeId,
        method: 'get',
    })
}

export function addHcyp(query) {
    return request({
        url: '/resource/consume',
        method: 'post',
        data: query
    })
}

export function bzwzOut(query) {
    return request({
        url: '/resource/bzwz/out',
        method: 'put',
        data: query
    })
}

export function batchHcypOut(query) {
    return request({
        url: '/resource/consume/out',
        method: 'post',
        data: query
    })
}

export function getJcxmList() {
    return request({
        url: '/resource/bzwz/jcxm/bucketList',
        method: 'get',
    })
}

// 查询领用记录列表
export function listUseList(query) {
    return request({
        url: '/resource/consume/out/list',
        method: 'get',
        params: query
    })
}

// 超期处置列表查询
export function listDelayHandle(query) {
    return request({
        url: '/resource/bzwz/delayHandle/list',
        method: 'get',
        params: query
    })
}

// 处置按钮查询
export function handleForm(bzwzIds) {
    return request({
        url: 'resource/bzwz/handle/batch/' + bzwzIds,
        method: 'get',
    })
}

// 超期处置保存
export function saveBatchHandle(query) {
    return request({
        url: '/resource/bzwz/handle/batch',
        method: 'post',
        data: query
    })
}

export function getTotalPrice() {
    return request({
        url: '/resource/bzwz/out/count',
        method: 'get',
    })
}

export function listHandle(query) {
    return request({
        url: '/resource/bzwz/handle/list',
        method: 'get',
        params: query
    })
}

export function getRemainGg(consumeId) {
    return request({
        url: '/resource/consume/count/' + consumeId,
        method: 'get',
    })
}

export function saveRemainGg(query) {
    return request({
        url: '/resource/consume/updateCount',
        method: 'put',
        data: query
    })
}